/**
 *
 * Licensed Materials - Property of IBM 
 * 
 * OCO Source Materials 
 * 
 * (C) Copyright IBM Corp. 2011, 2012 All Rights Reserved 
 * 
 * The source code for this program is not published or other- 
 * wise divested of its trade secrets, irrespective of what has 
 * been deposited with the U.S. Copyright Office. 
 *
 */

/**
 * CHANGE HiSTORY:
 * Author             Time                 Description
 *
 */
package com.ibm.ba.demo.dao;

import java.sql.ResultSet;
import java.sql.SQLException;

import org.springframework.jdbc.core.RowMapper;

import com.ibm.ba.demo.entity.Product;

public class ProductRowMapper implements RowMapper<Product> {
	public Product mapRow(ResultSet rs, int index) throws SQLException {
		Product product = new Product();
		product.setProductId(rs.getInt("P_PARTKEY"));
		product.setProductName(rs.getString("P_NAME"));
		return product;
	}
}
